import { axios } from '@/utils/request'

/**
 * 查询登录日志列表
 * @param query
 * @returns {*}
 */
export function list(query) {
  return axios({
    url: '/monitor/loginLog/list',
    method: 'get',
    params: query
  })
}

/**
 * 删除登录日志
 * @param infoId
 * @returns {*}
 */
export function delLoginLog(infoId) {
  return axios({
    url: '/monitor/loginLog/' + infoId,
    method: 'delete'
  })
}

/**
 * 解锁用户登录状态
 * @param userId
 * @returns {*}
 */
export function unlockLoginLog(userId) {
  return axios({
    url: '/monitor/loginLog/unlock/' + userId,
    method: 'get'
  })
}

/**
 * 清空登录日志
 * @returns {*}
 */
export function cleanLoginLog() {
  return axios({
    url: '/monitor/loginLog/clean',
    method: 'delete'
  })
}
